package com.datatraffic.broadcastservices;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
 
public class MyReceiver extends BroadcastReceiver {
 
    @Override
    public void onReceive(Context context, Intent intent) {
    	SharedPreferences prefsErase = PreferenceManager
				.getDefaultSharedPreferences(context);
		SharedPreferences.Editor editor = prefsErase.edit();
		
		editor.putBoolean("start", true);
		editor.commit();
        Intent service = new Intent(context, ServicioAlarma.class);
        context.startService(service);
    }
}
